import request from "@/utils/request";
//多条件分页查询车队消息
export function queryAllFleetByPage(fleetDto) {
  return request({
    url: "/pd-base/fleet/queryAllFleetByPage",
    method: "post",
    data: fleetDto
  });
}
//根据id查询车队信息
export function queryFleetById(id) {
  return request({
    url: `/pd-base/fleet//getFleetById/${id}`,
    method: "get",
    params: { id }
  });
}
//删除车队信息
export function deleteFleetById(id) {
  return request({
    url: `/pd-base/fleet/deleteFleetById/${id}`,
    method: "get",
    params: { id }
  });
}
//添加车队信息
export function addFleet(fleetBean){
  return request({
    url: "/pd-base/fleet/addFleet",
    method: "post",
    data: fleetBean
  });
}
//修改车队信息
export function updateFleet(fleetBean){
  return request({
    url: "/pd-base/fleet/updateFleet",
    method: "post",
    data: fleetBean
  });
}
//根据车队编号查询车辆消息
export function queryTruckByFleetId(truckFleetDto) {
  return request({
    url: '/pd-base/truck/queryTruckByFleetId',
    method: "post",
    data:truckFleetDto
  });
}
//根据用户编号查询该网点下的车队负责人
export function getFleetManagerByFleetId(id) {
    return request({
      url: `/pd-base/fleet/getFleetManagerByFleetId/${id}`,
      method: "get",
      params: { id }
    });
}
//根据车队编号查询司机信息、
export function queryDriverByFleetId(dto) {
  return request({
    url: '/pd-base/truck_driver/findTruck_driverList',
    method: "post",
    data:dto
  });
}
//查询当前网点的车队信息
export function getAllFleetByAgency(agency_id) {
  return request({
    url: `/pd-base/fleet/getAllFleetByAgencyId/${agency_id}`,
    method: "get",
    params: { agency_id }
  });
}
